<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:p="http://primefaces.org/ui">

    <h:form id="PytctbactmeseListForm">

        <p:panel header="#{myBundle.ListPytctbactmeseTitle}">

            <p:dataTable id="datalist" value="#{pytctbactmeseController.items}" var="item"
                         selectionMode="single" selection="#{pytctbactmeseController.selected}"
                         rowKey="#{item.pytctbactmeseid}"
                         paginator="true"
                         rows="5"
                         rowsPerPageTemplate="5,10,20,30"
                         >

                <p:ajax event="rowSelect"   update="createButton viewButton editButton deleteButton"/>
                <p:ajax event="rowUnselect" update="createButton viewButton editButton deleteButton"/>

                <p:column sortBy="#{item.pytctbactmeseid}" filterBy="#{item.pytctbactmeseid}">
                    <f:facet name="header">
                        <h:outputText value="#{myBundle.ListPytctbactmeseTitle_pytctbactmeseid}"/>
                    </f:facet>
                    <h:outputText value="#{item.pytctbactmeseid}"/>
                </p:column>
                
                <p:column sortBy="#{item.pytctbactmespid.pytctbactmespid}" filterBy="#{item.pytctbactmespid.pytctbactmespid}">
                    <f:facet name="header">
                        <h:outputText value="#{myBundle.ListPytctbactmeseTitle_pytctbactmespid}"/>
                    </f:facet>
                    <h:outputText value="#{item.pytctbactmespid.pytctbactmespid}"/>
                </p:column>
                
                <p:column sortBy="#{item.porcentajejec}" filterBy="#{item.porcentajejec}">
                    <f:facet name="header">
                        <h:outputText value="#{myBundle.ListPytctbactmeseTitle_porcentajejec}"/>
                    </f:facet>
                    <h:outputText value="#{item.porcentajejec}"/>
                </p:column>
                
                 <p:column sortBy="#{item.comentarios}" filterBy="#{item.comentarios}">
                    <f:facet name="header">
                        <h:outputText value="#{myBundle.ListPytctbactmeseTitle_comentarios}"/>
                    </f:facet>
                    <h:outputText value="#{item.comentarios}"/>
                </p:column>
                
                <p:column sortBy="#{item.aprobdir}" filterBy="#{item.aprobdir}">
                    <f:facet name="header">
                        <h:outputText value="#{myBundle.ListPytctbactmeseTitle_aprobdir}"/>
                    </f:facet>
                    <h:selectBooleanCheckbox id="aprobdir" value="#{item.aprobdir}" title="#{myBundle.EditPytctbactmeseTitle_aprobdir}" required="true" requiredMessage="#{myBundle.EditPytctbactmeseRequiredMessage_aprobdir}" disabled="true"/>
                </p:column>
                
                <p:column sortBy="#{item.aprobugp}" filterBy="#{item.aprobugp}">
                    <f:facet name="header">
                        <h:outputText value="#{myBundle.ListPytctbactmeseTitle_aprobugp}"/>
                    </f:facet>
                    <h:selectBooleanCheckbox id="aprobugp" value="#{item.aprobugp}" title="#{myBundle.EditPytctbactmeseTitle_aprobugp}" required="true" requiredMessage="#{myBundle.EditPytctbactmeseRequiredMessage_aprobugp}" disabled="true"/>
                </p:column>
               
                <p:column sortBy="#{item.fecharegistro}" filterBy="#{item.fecharegistro}">
                    <f:facet name="header">
                        <h:outputText value="#{myBundle.ListPytctbactmeseTitle_fecharegistro}"/>
                    </f:facet>
                    <h:outputText value="#{item.fecharegistro}">
                        <f:convertDateTime pattern="MM/dd/yyyy HH:mm:ss" />
                    </h:outputText>
                </p:column>
                
                <p:column sortBy="#{item.observaciones}" filterBy="#{item.observaciones}">
                    <f:facet name="header">
                        <h:outputText value="#{myBundle.ListPytctbactmeseTitle_observaciones}"/>
                    </f:facet>
                    <h:outputText value="#{item.observaciones}"/>
                </p:column>
               
                <f:facet name="footer">
                    <p:commandButton id="createButton" icon="ui-icon-plus"   value="#{myBundle.Create}" actionListener="#{pytctbactmeseController.prepareCreate}" update=":PytctbactmeseCreateForm" oncomplete="PytctbactmeseCreateDialog.show()"/>
                    <p:commandButton id="viewButton"   icon="ui-icon-search" value="#{myBundle.View}" update=":PytctbactmeseViewForm" oncomplete="PytctbactmeseViewDialog.show()" disabled="#{empty pytctbactmeseController.selected}"/>
                    <p:commandButton id="editButton"   icon="ui-icon-pencil" value="#{myBundle.Edit}" update=":PytctbactmeseEditForm" oncomplete="PytctbactmeseEditDialog.show()" disabled="#{empty pytctbactmeseController.selected}"/>
                    <p:commandButton id="deleteButton" icon="ui-icon-trash"  value="#{myBundle.Delete}" actionListener="#{pytctbactmeseController.delete}" update=":growl,datalist" disabled="#{empty pytctbactmeseController.selected}"/>
                </f:facet>

            </p:dataTable>

        </p:panel>

    </h:form>

</ui:composition>